const express = require('express')
const cors = require('cors')
const morgan = require('morgan')

const app = express()
const port = process.env.PORT || 3000

app.use(express.json())
app.use(cors())
app.use(morgan('dev'))

app.use('/api', require('./router'))

app.listen(`${port}`, () => {
  console.log(`server run 127.0.0.1:${port}`)
})